Ext.define('ExtjsAPP.view.login.login', {
    extend: 'Ext.container.Viewport',
    xtype: 'login',
    style : "background-image: url('https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1542959457&di=d51b26b50e30058e8234bbcab5365ddd&imgtype=jpg&er=1&src=http%3A%2F%2Fwww.5068.com%2Fuploads%2Fallimg%2F171125%2F1-1G125100536.jpg')",

    requires: [
        'Ext.form.Panel',
        'ExtjsAPP.view.login.loginController'
    ],

    controller:'login',

    bodyPadding: 10,
    title:'用户登录',

    closable:false,//窗口是否可关闭
    autoShow:true,//windows默认是隐藏，要设置为显示

    layout: 'center',
    items: [{
        xtype: 'container',
        width: 300,
        height: 200,
        layout: 'fit',
        items: [{
            xtype: 'form',
            layout: 'form',
            title: 'login',
            items: [{
                xtype:'textfield',
                name: 'username',
                fieldLabel: '用户名',
                allowBlank: false
            },{
                xtype:'textfield',
                name: 'password',
                fieldLabel: '密码',
                allowBlank: false
            }],
            buttons: [{
                text: '登陆',
                listeners:{
                    click: 'onLoginClick'
                }
            }]
        }]
    }]
});